    	<div class="position">当前位置：<a href="<?php echo Yii::app()->createUrl('member/index/index');?>"><?php echo t('Member','web') ?></a> &gt; <a href="<?php echo Yii::app()->createUrl('member/index/orders');?>">交易管理</a> &gt; 收货地址</div>
        <div class="remind_box mt10"><span class="mem_ico ico_tip"></span>友情提醒：最多保存10个收货地址</div>
        <div class="hr_15"></div>
        <!--管理收货地址  start-->
        <div class="pub_tab address_manage">
            <div class="tab_hd2">
                <ul class="c_f">
                    <li class="select"><a href="<?php echo Yii::app()->createUrl('member/index/addresses');?>">我的收货地址<b class="mem_bgx left"></b><b class="mem_bgx right"></b></a></li>
                    <li><a href="javascript:" onclick="checkAddress()">新增收货地址<b class="mem_bgx left"></b><b class="mem_bgx right"></b></a></li>
                </ul>
            </div>
            <div class="tab_cont2">
                    <table class="list_table list_table2" width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                            <th width="8%">默认</th>
                            <th width="8%">联系人</th>
                            <th class="tl" width="18%">所在地区</th>
                            <th class="tl" width="20%">街道地址</th>
                            <th width="12%">邮编</th>
                            <th class="tl" width="14%">电话号码</th>
                            <th width="12%">手机号码</th>
                            <th width="8%">操作</th>
                        </tr>
                    </table>
    		<?php $this->widget('zii.widgets.CListView', array(
                'dataProvider'=>$model->listSearch(),
                'itemView'=>'_aview',
                'template'=>'{items}',
                'itemsTagName'=>'table',
                'itemsOptions'=>array('class'=>'list_table list_table2','width'=>'100%','cellpadding'=>0,'cellspacing'=>0),
            )); ?>
            </div>
        </div>
        <!--管理收货地址  end-->
<script type="text/javascript">
function addaddress(zmaid)
{
    //alert(zmaid);
    $.ajax({
        type:"POST",
        url: "<?php echo Yii::app()->createUrl('/ajax/AjaxAddAdders/') ?>",
        data:"zmaid="+zmaid,
        success: function(msg){
            alert(msg);
            //$mycart = msg;
        }
    })
}

//验证收货地址是否超过10个
function checkAddress(){
	$.ajax({
        url:"<?php echo Yii::app()->createUrl('/ajax/AjaxAddAddress/') ?>",
        type:'GET',
        data:'1',
        success:function(msg){
            if(msg<10){
        	window.location.href="<?php echo Yii::app()->createUrl('member/index/addaddress');?>";
        }
            else{
    			alert("对不起，收货地址最多设置10条");
                }
        }
    });  	
	}
</script>